import request from '../utils/request.js'

//货道管理列表(可滑动)
export const getSlotList = (data) => {
  return request({
    url: `/applet/slot/list`,
    method: "get",
    data,
  })
}

//货道按药品名称查询
export const getMedicine = (data) => {
  return request({
    url: `/applet/slot/medicine/list`,
    method: "get",
    data
  })
}
//绑定货道
export const slotBind = (data) => {
  return request({
    url: `/applet/slot/bind`,
    method: "get",
    data,
  })
}
//货道解绑
export const slotUnbind = (data) => {
  return request({
    url: `/applet/slot/unbind`,
    method: "get",
    data,
  })
}
//收回机械臂
export const retract = (data) => {
  return request({
    url: `/applet/inventory/retract`,
    method: "post",
    data,
  })
}
// 补药
export const slotMedicine = (data) => {
  return request({
    url: `/applet/slot/refillMedicine`,
    method: "get",
    data,
  })
}
// 生成追溯码
export const generateTraceCode = (data) => {
  return request({
    url: `/applet/inventory/generateTraceCode`,
    method: "get",
    data,
  })
}

//修改预警值
export const editThreshold = (data) => {
  return request({
    url: `/applet/slot/editThreshold`,
    method: "get",
    data,
  })
}